/*
 *  AProject.h
 *  libavid
 *
 *  Created by Peter on 25.02.12.
 *  Copyright 2012 __MyCompanyName__. All rights reserved.
 *
 */

#ifndef A_PROJECT_H
#define A_PROJECT_H

#include "AObject.h"
#include <list>

// Version: 10 (MC 7 old versioning scheme, MC 5.0.3)
class AProject : public AObject
{

public:
	
	A_DECLARE_CLASS( 'Iprj', AProject, AObject );
	
	void readFromStream( AStream& str, const AObjDoc& objd );
	void dump( std::ostream& str ) const;
	
	
	struct Bin
	{
		UInt32 _fileLocator; // AFileLocator* _fileLocator; // fileLocator: 0x00000008
		bool   _wasOpen;
		bool   _wasExternal;
		UInt32 _unused; // 0
		// The actual Avid probably has an ABin* pointer here that is non-null if the bin is currently open
	};
	
	typedef std::list< Bin* > BinList;
	
	// Int16 _numBins; // Only relevant when reading/writing of course
	Int16 _version; // 1
	Int16 _iWindRect[ 4 ];
	
	BinList _bins;
	
	UInt8 _iVideoFormat;  // 0x02
	UInt8 _iSourceFormat; // 0x01
	UInt8 _iFilmType;     // 0x00
	bool  _iFilmEditing;  // False
	
	Int32 _numMobs;       // 20
	// ...
	
};

#endif /*Inclusion Guard*/